Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

feat: ng-swipe-left/ng-swipe-right directives #1403

Closed
wants to merge 1 commit into from
Closed

feat: ng-swipe-left/ng-swipe-right directives #1403

wants to merge 1 commit into from

Conversation

mehmetf
Copy link
Contributor

@mehmetf mehmetf commented Aug 28, 2014

Support swipe gesture for touch enabled devices.

@mhevery
Copy link
Contributor

mhevery commented Aug 28, 2014

Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement). CLA is important for us to be able to avoid legal troubles down the road.

For individuals (a simple click-through form): http://code.google.com/legal/individual-cla-v1.0.html

@mhevery mhevery added cla: no and removed cla: yes labels Aug 28, 2014
@mhevery
Copy link
Contributor

mhevery commented Aug 28, 2014

Achievement unlocked: CLA signature found!

@mhevery mhevery added cla: yes and removed cla: no labels Aug 28, 2014
Function fn;

// Subclasses decide on swipe direction whether to call fn or not.
bool shouldFire();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool get shouldFire;

class NgSwipeRight extends _SwipeGesture {
NgSwipeRight(dom.Element target): super(target);

bool get shouldFire => xDirection == _SwipeGesture.RIGHT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor, style:

bool get shouldFire => xDirection == _SwipeGesture.RIGHT &&
                       yDirection == _SwipeGesture.NO_SWIPE;

(operators must be at eol)

@vicb
Copy link
Contributor

vicb commented Aug 29, 2014

Thanks for the updates, could you please do the request updates (minor, style), squash your commits & force push. Thanks.

@vicb
Copy link
Contributor

vicb commented Aug 29, 2014

LGTM

@mhevery
Copy link
Contributor

mhevery commented Aug 29, 2014

Thanks for the contribution. I think This is a good idea, but we should have it as a separate library. Can you look at how animation lives in a separate folder and has a separate module, please model it same.

@mehmetf
Copy link
Contributor Author

mehmetf commented Sep 2, 2014

The latest travis fail is due to some merge problem with pubspec.lock which I have not changed. There's nothing blocking this PR.

@chirayuk chirayuk force-pushed the master branch 2 times, most recently from 8fd235c to 50e2645 Compare September 5, 2014 23:10
Support swipe gesture for touch enabled devices.
vsavkin pushed a commit that referenced this pull request Sep 14, 2014
Support swipe gesture for touch enabled devices.

Closes #1403
@vsavkin vsavkin closed this in 5d84c6d Sep 14, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants